package com.ktgj.customer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.InsuranceCompanyMapper;
import com.ktgj.customer.domain.InsuranceCompany;
import com.ktgj.customer.service.IInsuranceCompanyService;

/**
 * 保险公司
Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-27
 */
@Service
public class InsuranceCompanyServiceImpl implements IInsuranceCompanyService 
{
    @Autowired
    private InsuranceCompanyMapper insuranceCompanyMapper;

    /**
     * 查询保险公司

     * 
     * @param insCoId 保险公司
ID
     * @return 保险公司

     */
    @Override
    public InsuranceCompany selectInsuranceCompanyById(Long insCoId)
    {
        return insuranceCompanyMapper.selectInsuranceCompanyById(insCoId);
    }

    /**
     * 查询保险公司
列表
     * 
     * @param insuranceCompany 保险公司

     * @return 保险公司

     */
    @Override
    public List<InsuranceCompany> selectInsuranceCompanyList(InsuranceCompany insuranceCompany)
    {
        return insuranceCompanyMapper.selectInsuranceCompanyList(insuranceCompany);
    }

    /**
     * 新增保险公司

     * 
     * @param insuranceCompany 保险公司

     * @return 结果
     */
    @Override
    public int insertInsuranceCompany(InsuranceCompany insuranceCompany)
    {
        return insuranceCompanyMapper.insertInsuranceCompany(insuranceCompany);
    }

    /**
     * 修改保险公司

     * 
     * @param insuranceCompany 保险公司

     * @return 结果
     */
    @Override
    public int updateInsuranceCompany(InsuranceCompany insuranceCompany)
    {
        return insuranceCompanyMapper.updateInsuranceCompany(insuranceCompany);
    }

    /**
     * 批量删除保险公司

     * 
     * @param insCoIds 需要删除的保险公司
ID
     * @return 结果
     */
    @Override
    public int deleteInsuranceCompanyByIds(Long[] insCoIds)
    {
        return insuranceCompanyMapper.deleteInsuranceCompanyByIds(insCoIds);
    }

    /**
     * 删除保险公司
信息
     * 
     * @param insCoId 保险公司
ID
     * @return 结果
     */
    @Override
    public int deleteInsuranceCompanyById(Long insCoId)
    {
        return insuranceCompanyMapper.deleteInsuranceCompanyById(insCoId);
    }

    /**
     * 保险公司列表
     * */
    @Override
    public List<InsuranceCompany> insuranceCompanyList() {
        List<InsuranceCompany> insuranceCompanies = insuranceCompanyMapper.insuranceCompanyList();
        return insuranceCompanies;
    }
}
